home *** CD-ROM | disk | FTP | other *** search
- property timeLimit, lastAction, spritenum, bannerHeight, scrollRate, button
-
- on new me, params
- set button to getProp(params, #button)
- set spritenum to getProp(params, #spritenum)
- set scrollRate to getProp(params, #scrollRate)
- set timeLimit to getProp(params, #timeLimit) * 60
- set lastAction to the ticks
- set bannerHeight to the height of member the memberNum of sprite spritenum
- puppetSprite(spritenum, 1)
- ResetPos(me)
- return me
- end
-
- on CheckIdle me
- set currTime to the ticks
- set lastSysClick to currTime - the lastClick
- if lastSysClick > lastAction then
- put "New click"
- set lastAction to lastSysClick
- end if
- set titleObj to GetGlobal(#gTitleObject)
- set menuObj to the currMenu of titleObj
- set videoDisplay to the videoDisplay of menuObj
- if objectp(videoDisplay) then
- if the movieRate of sprite the spritenum of videoDisplay <> 0 then
- set lastAction to currTime
- end if
- end if
- set currLoc to the locV of sprite spritenum
- set bannerTopPos to 480 - (bannerHeight / 2)
- set bannerBottomPos to 480 + (bannerHeight / 2)
- if (currTime - lastAction) > timeLimit then
- if currLoc > bannerTopPos then
- set currLoc to currLoc - scrollRate
- end if
- else
- if currLoc < bannerBottomPos then
- set currLoc to currLoc + scrollRate
- end if
- end if
- if currLoc < bannerTopPos then
- set currLoc to bannerTopPos
- end if
- if currLoc > bannerBottomPos then
- set currLoc to bannerBottomPos
- end if
- set the locV of sprite spritenum to currLoc
- end
-
- on ResetPos me
- set bannerBottomPos to 480 + (bannerHeight / 2)
- set the locV of sprite spritenum to bannerBottomPos
- end
-
- on ChangeAd me, memNum
- if objectp(button) then
- set dest to the name of member memNum
- set the destination of button to dest
- set the statusMessage of the statusMessage of button to "More about" && dest
- end if
- if stringp(memNum) then
- set memNum to the number of member memNum
- end if
- set bannerHeight to the height of member memNum
- set the memberNum of sprite spritenum to memNum
- ResetPos(me)
- end
-
- on dispose me
- end
-